<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 
    <h:body> 
        <ui:composition template="templates/template.xhtml">
            <ui:define name="title">Connexion - Administration ShopEasy</ui:define>
            <ui:define name="banner">
                <section id="banner" class="connexion">                    
                    <header>
                        <div>                            
                            <h:form id="formulaire">
                                <p:growl />                                
                                <h:panelGrid columns="1" style="margin: 0 auto 15px auto;" cellspacing="15">                                    
                                    <p:inputText id="login" value="#{connexionBean.login}" required="true" placeholder="Login..." requiredMessage="Champs invalide: Login requis." />                       
                                    <p:password id="mdp" value="#{connexionBean.mdp}" required="true" placeholder="Mot de passe..." 
                                                requiredMessage="Champs invalide: Mot de passe requis." onkeyup="if (event.keyCode == 13) getElementById('formulaire:bouton').click();"/>
                                </h:panelGrid>
                                <p:commandLink id="bouton" action="#{connexionBean.connecter()}" styleClass="button" value="Se connecter" update="@form" />
                            </h:form>
                        </div>
                    </header>
                </section>                
            </ui:define>            
        </ui:composition>        
    </h:body> 
</html>